/*
 * [GPanos].[dbo].[Pictures]
 */
module.exports = function (sequelize, DataTypes) {
	return sequelize.define("Picture", {
		id: {
			type: DataTypes.INTEGER,
			allowNull: false,
			primaryKey: true,
			autoIncrement: true,
			field: "Id"
		},
		fileName: {
			type: DataTypes.STRING(500),
			allowNull: false,
			field: "FileName"
		},
		previous: {
			type: DataTypes.INTEGER,
			references: {
				model: "Pictures",
				key: "Id"
			},
			field: "Previous"
		},
		next: {
			type: DataTypes.INTEGER,
			references: {
				model: "Pictures",
				key: "Id"
			},
			field: "Next"
		},
		longitude: {
			type: DataTypes.FLOAT,
			allowNull: false,
			field: "Longitude"
		},
		latitude: {
			type: DataTypes.FLOAT,
			allowNull: false,
			field: "Latitude"
		},
		polyline: {
			type: DataTypes.INTEGER,
			allowNull: false,
			references: {
				model: "Polylines",
				key: "Id"
			},
			field: "Polyline"
		}
	}, {
		timestamps: false
	});
};